package com.lynx.core.impl;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.lynx.core.View;
/**
 * 
 * @author lxp
 *
 */
public class RedirectView implements View {

	private String uri;

	public RedirectView(String uri) {
		this.uri = uri;
	}

	public void render(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException,Exception {
		response.sendRedirect(request.getContextPath() + this.uri);
	}

}
